Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 10 - AppleTalk Addressing / AppleTalk Addressing Reference
Basic Constants


The Combined DDP-NBP Address Structure

You use the combined DDP-NBP address format, specified by the combined DDP-NBP address structure, to identify the physical socket address and the NBP name associated with your endpoint for use when you bind an endpoint. The combined DDP-NBP address structure is defined by the DDPNBPAddress data type.

struct DDPNBPAddress
{
   OTAddressType  fAddressType;
   UInt16         fNetwork;
   UInt8          fNode;
   UInt8          fSocket;
   UInt8          fDDPType;
   UInt8          fPad;
   UInt8          fNBPNameBuffer[kNBPEntityBufferSize];
};
FIELD DESCRIPTIONS
fAddressType
A number that specifies the format of the address. Use the constant AF_ATALK_DDPNBP.
fNetwork
A 16-bit number in the range 0 to 65,534 that specifies the network number. The network number 65,535 (all bits set to 1) is reserved by Apple Computer, Inc. The network number 0 specifies the node's local network.
fNodeID
An 8-bit number in the range from 0 to 255 that specifies the node ID. A node ID of 255 is accepted by all nodes, permitting the broadcasting of packets to all nodes on the network; a node ID of 0 specifies your own local node and is illegal other than
at bind time. For other values, refer to Inside AppleTalk,
second edition.
fSocket
An 8-bit number in the range of 1 through 254 that specifies a logical entity on your node. A socket number of 0 at bind time instructs Open Transport to dynamically assign a socket number; a socket number of 4 indicates the echo socket. For other values, refer to Inside AppleTalk, second edition.
fDDPType
A number identifying the DDP type field. Unless you are using the DDP protocol directly, set this field to 0. For additional information see the chapter "Datagram Delivery Protocol (DDP)" in this book and Inside AppleTalk, second edition.
fPad
Reserved. Set to 0.
fNBPNameBuffer
An 8-bit number that specifies the buffer that holds the NBP name string. The string specifies an endpoint name in the format name:type@zone and is not null terminated. You can precede colons (:), at signs (@), and backslash (\) characters with a backslash if you want to include them as part of the name.
The constant kNBPEntityBufferSize specifies the maximum size of the buffer, currently defined to be 105 bytes. This permits a string whose name, type, and zone fields each contain the maximum 32 characters, plus 2 bytes for the separator characters (: and @) and 7 bytes for an optional pad bytes and 6 escape characters, which are indicated by the backslash (\) followed by a colon (:), at sign (@), or another backslash.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996